package part7;

/**
 * @author wcj
 * @Date 2021/5/15 14:50
 * @Version 1.0
 */
public class Part72 extends Pet{

    @Override
    public void scrub(){
        append("Part71.scrub");
        super.scrub();
    }

    public static void main(String[] args) {
        Part72 part72 = new Part72();
        part72.scrub();
        System.out.println(part72);
    }

}

class Pet{
    private String s = "cat";

    public void append(String a){
        s += a;
    }

    public void dilute(){
        append("dilute");
    }

    public void apply(){
        this.append("apply");
    }

    public void scrub(){
        this.append("scrub");
    }

    @Override
    public String toString(){
        return s;
    }

    public static void main(String[] args) {
        Pet pet = new Pet();
        pet.dilute();
        pet.apply();
        pet.scrub();
        System.out.println(pet);
    }
}
